#从框架中引入 标准模板 数据模板
from django.db import models
#创建数据模型 实质ORM 关系映射 类--表
class Users(models.Model):
    #属性 -- 字段 设置字段数据类型 字符型
    uid= models.AutoField(primary_key=True)
    username = models.CharField(max_length=32)
    userpasswd =models.CharField(max_length=32)

#表
class Table(models.Model):
    uid = models.AutoField(primary_key=True)
    name = models.CharField(max_length=32)
    image = models.CharField(max_length=64)
    price = models.FloatField(max_length=32)
    number = models.DecimalField(max_digits=10, decimal_places=2)


class  Cars(models.Model):
    cid = models.AutoField(primary_key=True)
    gid = models.DecimalField(max_digits=10, decimal_places=0)
    buy_count = models.DecimalField(max_digits=10, decimal_places=0)
    uid = models.DecimalField(max_digits=10, decimal_places=0)